{}

<template>
	<div class="page">
		
		<head-back></head-back>
		
		<div class="content contentf">
			<div class="content-boxshow content-marbottom10 content-martop10">
				<div class="list-block media-list list-margin ">
					<ul>
						<li>
							<div class="item-content">
								<div class="item-inners content-padr5 content-padlefts" >
									<div class="item-title-row">
										<div class="item-title min-font ">{{pjinfo.pjname}}</div>
										<div class="item-after min-font colorfff content-padbots">{{pjinfo.createdate}}</div>
									</div>
									<div class="item-subtitle content-pad2 colorfff ">{{pjinfo.pjdesc}}</div>
									<div class="item-text">
										<span class="newBtn border">
										端口扫描</span>
										<span class="newBtn border">
										口令扫描</span>
										<span class="newBtn border">
										口令扫描</span>
									</div>
									<span class="min-font pull-right colorfff content-padbots">{{pjinfo.finishdate}}</span>
								</div>
							</div>

							<div class="row no-gutter content-pad10l">
								<div class="col-33">
									<span class="min-font display-block text-center content-padtb color-999">高危漏洞</span>
									<samll class="text-center display-block color-fff">
										5
									</samll>
								</div>
								<div class="col-33">
									<span class="min-font display-block text-center content-padtb color-999">中危漏洞</span>
									<samll class="text-center display-block color-ffb">
										8
									</samll>
								</div>
								<div class="col-33">
									<span class="min-font display-block text-center content-padtb color-999">低危漏洞</span>
									<samll class="text-center display-block color-fff">
										3
									</samll>
								</div>
							</div>

							<div class="content-pad10about overflow" >
								
							</div>
						</li>
					</ul>
				</div>
			</div>

			<!--settings--> 
			<div class="list-block content-boxshow list-margin">
				<ul>
					<li class="item-content item-link content-padrights pb-popup">
						<div class="item-inner border-bottom">
							<div class="item-title color-333 font-14">口令字典</div>
						</div>
					</li>
				</ul>
			</div>
			<!--end-->
			<!--tab-->
			<div class="buttons-tab content-martop10">
				<a href="#tab1" class="tab-link active button">运行中</a>
				<a href="#tab2" class="tab-link button">已完成</a>
			</div>
			<div class="content-boxshow">
				<div class="tabs content-marbottom10">
					<div id="tab1" class="tab active">

					</div>
					<div id="tab2" class="tab backfff">

					</div>
				</div>
			</div>
			<!--end-->
		</div>
		<footer class="bar bar-tab">
			<div class="row padding20">
				<div class="col-50">
					<a href="/#/task.new" class="button button-big button-round button-warning">新建任务</a>
				</div>
				<div class="col-50">
					<a href="#" class="button button-big button-round button-success">生成报告</a>
				</div>
			</div>
		</footer>
	</div>
	
	<panel></panel>
	
</template>

<script>
	import headBack from "../components/headBack.vue"
	import panel from "../components/panel.vue"
	import store from "../vuex/store.js"
	import getters from "../vuex/getters.js"
	import actions from "../vuex/actions.js"
	export default {
		name: "pjview",
		data(){
			return {
				pjinfo: {
					'pjid':'11111111111111111111',
					'pjname':'深圳证券交易所',
					'pjdesc':'内网渗透测试项目',
					'createdate':1497334352,
					'finishdate':1497334352

				},
				tasks:[]
			}
		},
		methods: {
			view(){
				var _self = this;
				var id = this.$route.params.id;
				$.ajax({
					url: "/static/data/borrow.json",
					data: {"id": id},
					dataType: "json",
					success: function(res){
						if(res.code==1)_self.detail = res.detail;
					},
					async: false
				});
			},
			getPhotos(){
				var _self = this;
				$("#photosBox li.pb-popup").each(function(i){
					$(this).click(function(){
						var photoPopup = $.photoBrowser(_self.detail.list[i]);
						photoPopup.open();
					});
				});
			}
		},
		components: {
			headBack,
			panel
		},
		store: store,
		vuex: {
			getters: {
				isLogin: getters.loginStatus
			},
			actions: {
				tokenState: actions.tokenState
			}
		},
		route: {
			data(){
				this.tokenState()
				this.view()
			}
		},
		ready(){
			this.getPhotos();
			$.init();
		}
	}
</script>